package com.asiainfo.dacp.datastash.domain.unitmonitor.repos;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.asiainfo.dacp.datastash.orm.dao.core.DataStashBrokerDao;
import com.asiainfo.dacp.datastash.orm.po.core.DataStashBrokerPo;

@Repository
public class DataStashBrokerRepository {
	@Autowired
	private  DataStashBrokerDao dataStashBrokerDao;
	
	public List<DataStashBrokerPo> findAll() {
		return dataStashBrokerDao.findAll();
	}
	
	public List<DataStashBrokerPo> findByBrokerIp(String brokerIp,String isAlive) {
		return dataStashBrokerDao.findByBrokerIp(brokerIp, isAlive);
	}
	
	public List<DataStashBrokerPo> findByBrokerIpAndState(String brokerIp,String isAlive){
		return dataStashBrokerDao.findByBrokerIpAndState(brokerIp, isAlive);
	}
}
